#include "downmap.h"



#include<Defines.h>

DownMap::DownMap()
{
    //初始化地图
    map1.load(MAP_PATH);
    map2.load(MAP_PATH);
    //初始化Y轴坐标
    map1_posy=-GAME_HEIGHT;
    map2_posy=0;
    //滚动速度
    map_speed=MAP_SCROOL_SPEED;
}
void DownMap::MapPos(){
    //第一张
    map1_posy+=map_speed;
    if(map1_posy>=0){
        map1_posy=-GAME_HEIGHT;
    }
    //第二张
    map2_posy+=map_speed;
    if(map2_posy>=GAME_HEIGHT){
        map2_posy=0;
    }
}
